]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
modalDialog: Request HEIGHT_FOR_WIDTH
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 11 Jul 2013 14:43:04 +0000 (16:43 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 20 Aug 2013 06:18:29 +0000 (08:18 +0200)
All our modal dialogs are given a fixed width and grow vertically
as necessary. Set the request mode accordingly, so that wrapped
labels are considered correctly during size request, and not only
at allocation time (where they'll either take away from the padding
or even cause the dialog to overflow).

https://bugzilla.gnome.org/show_bug.cgi?id=704015

js/ui/modalDialog.js

index 40a696812b55df98aa8ed052bc8e57e50b53999d..029cc410e5c6ff342aa28608c310c20a170f896b 100644 (file)
@@ -79,6 +79,11 @@ const ModalDialog = new Lang.Class({
 
         this.dialogLayout = new St.BoxLayout({ style_class: 'modal-dialog',
                                                vertical:    true });
+        // modal dialogs are fixed width and grow vertically; set the request
+        // mode accordingly so wrapped labels are handled correctly during
+        // size requests.
+        this.dialogLayout.request_mode = Clutter.RequestMode.HEIGHT_FOR_WIDTH;
+
         if (params.styleClass != null)
             this.dialogLayout.add_style_class_name(params.styleClass);